package com.buss.accounting.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.buss.core.dic.CheckStatus;

/**
 * 付款信息主对象
 * @author gykl
 *
 */
@Entity
@Table(name = "acc_paymentmaster")
@TableGenerator(name="paymentMaster_pk_sequence",initialValue=1,allocationSize=1,pkColumnName="seq_col",
	pkColumnValue="paymaster_seq",valueColumnName="seq_val",table="accounting_pk_sequence")
public class PaymentMaster implements Serializable {

	private static final long serialVersionUID = -3640159364896493052L;

	/**表主键*/
	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator="paymentMaster_pk_sequence")
	private Long id;
	
	/**单位ID*/
	@Column(nullable=false,length=20)
	private String companyId;
	
	/**付款单号*/
	@Column(nullable=false,length=20)
	private String paymentNumber;
	
	/**付款时间*/
	@Temporal(value=TemporalType.DATE)
	@Column(nullable=false)
	private Date paymentDate;
	
	/**往来单位ID*/
	@Column(nullable=false)
	private Long customerId;
	
	/**往来单位名称*/
	@Column(nullable=false,length=100)
	private String customerName;
	
	/**销售员编码*/
	@Column(nullable=false)
	private Long salesId;
	
	/**销售员名称*/
	@Column(nullable=false,length=20)
	private String salesName;
	
	/**往来单位账号ID*/
	@Column(nullable=false)
	private Long customerAccountId;
	
	/**合计额*/
	@Column(scale=2,nullable=false)
	private Float amount;
	
	/**审核状态*/
	@Enumerated(value=EnumType.STRING)
	@Column(length=10)
	private CheckStatus checkStatus;
	
	/**审核人ID*/
	private Long checkUserId;
	
	/**审核人姓名*/
	@Column(length=20)
	private String checkUserName;
	
	/**录入人ID*/
	private Long createUserId;
	
	/**录入人姓名*/
	@Column(length=20,nullable=false)
	private String createUserName;
	
	/**录入时间*/
	@Temporal(value=TemporalType.TIMESTAMP)
	private Date createDate;
	
	/**备注*/
	@Column(length=254)
	private String intro;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	public String getPaymentNumber() {
		return paymentNumber;
	}

	public void setPaymentNumber(String paymentNumber) {
		this.paymentNumber = paymentNumber;
	}

	public Date getPaymentDate() {
		return paymentDate;
	}

	public void setPaymentDate(Date paymentDate) {
		this.paymentDate = paymentDate;
	}

	public Long getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Long customerId) {
		this.customerId = customerId;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public Long getSalesId() {
		return salesId;
	}

	public void setSalesId(Long salesId) {
		this.salesId = salesId;
	}

	public String getSalesName() {
		return salesName;
	}

	public void setSalesName(String salesName) {
		this.salesName = salesName;
	}

	public Long getCustomerAccountId() {
		return customerAccountId;
	}

	public void setCustomerAccountId(Long customerAccountId) {
		this.customerAccountId = customerAccountId;
	}

	public Float getAmount() {
		return amount;
	}

	public void setAmount(Float amount) {
		this.amount = amount;
	}

	public CheckStatus getCheckStatus() {
		return checkStatus;
	}

	public void setCheckStatus(CheckStatus checkStatus) {
		this.checkStatus = checkStatus;
	}

	public Long getCheckUserId() {
		return checkUserId;
	}

	public void setCheckUserId(Long checkUserId) {
		this.checkUserId = checkUserId;
	}

	public String getCheckUserName() {
		return checkUserName;
	}

	public void setCheckUserName(String checkUserName) {
		this.checkUserName = checkUserName;
	}

	public Long getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(Long createUserId) {
		this.createUserId = createUserId;
	}

	public String getCreateUserName() {
		return createUserName;
	}

	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}
	
	
	
}
